package com.bsoft.gol.hcs.common.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

/**
 * @description:
 * @author: zhengcb10708
 * @create: 2021-02-07 11:28
 **/
@Entity
@Table(name = "msg_record", catalog = "")
public class MsgRecord {
    private long messageRecordId;
    private Long uid;
    private String msgTitle;
    private Byte msgType;
    private String content;
    private byte status;
    private Timestamp createDate;
    private Timestamp eventDate;
    private Byte event;
    private Byte complete;
    private Byte eventStep;
    private String dicCode;
    private Long eventId;
    private String hospitalCode;
    private String msgId;
    private Integer businessType;
    private String parameters;
    private Byte linkType;
    private String linkTarget;

    @Id
    @Column(name = "message_record_id")
    public long getMessageRecordId() {
        return messageRecordId;
    }

    public void setMessageRecordId(long messageRecordId) {
        this.messageRecordId = messageRecordId;
    }

    @Basic
    @Column(name = "uid")
    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    @Basic
    @Column(name = "msg_title")
    public String getMsgTitle() {
        return msgTitle;
    }

    public void setMsgTitle(String msgTitle) {
        this.msgTitle = msgTitle;
    }

    @Basic
    @Column(name = "msg_type")
    public Byte getMsgType() {
        return msgType;
    }

    public void setMsgType(Byte msgType) {
        this.msgType = msgType;
    }

    @Basic
    @Column(name = "content")
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Basic
    @Column(name = "status")
    public byte getStatus() {
        return status;
    }

    public void setStatus(byte status) {
        this.status = status;
    }

    @Basic
    @Column(name = "create_date")
    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "event_date")
    public Timestamp getEventDate() {
        return eventDate;
    }

    public void setEventDate(Timestamp eventDate) {
        this.eventDate = eventDate;
    }

    @Basic
    @Column(name = "event")
    public Byte getEvent() {
        return event;
    }

    public void setEvent(Byte event) {
        this.event = event;
    }

    @Basic
    @Column(name = "complete")
    public Byte getComplete() {
        return complete;
    }

    public void setComplete(Byte complete) {
        this.complete = complete;
    }

    @Basic
    @Column(name = "event_step")
    public Byte getEventStep() {
        return eventStep;
    }

    public void setEventStep(Byte eventStep) {
        this.eventStep = eventStep;
    }

    @Basic
    @Column(name = "dic_code")
    public String getDicCode() {
        return dicCode;
    }

    public void setDicCode(String dicCode) {
        this.dicCode = dicCode;
    }

    @Basic
    @Column(name = "event_id")
    public Long getEventId() {
        return eventId;
    }

    public void setEventId(Long eventId) {
        this.eventId = eventId;
    }

    @Basic
    @Column(name = "hospital_code")
    public String getHospitalCode() {
        return hospitalCode;
    }

    public void setHospitalCode(String hospitalCode) {
        this.hospitalCode = hospitalCode;
    }

    @Basic
    @Column(name = "msg_id")
    public String getMsgId() {
        return msgId;
    }

    public void setMsgId(String msgId) {
        this.msgId = msgId;
    }

    @Basic
    @Column(name = "business_type")
    public Integer getBusinessType() {
        return businessType;
    }

    public void setBusinessType(Integer businessType) {
        this.businessType = businessType;
    }

    @Basic
    @Column(name = "parameters")
    public String getParameters() {
        return parameters;
    }

    public void setParameters(String parameters) {
        this.parameters = parameters;
    }

    @Basic
    @Column(name = "link_type")
    public Byte getLinkType() {
        return linkType;
    }

    public void setLinkType(Byte linkType) {
        this.linkType = linkType;
    }

    @Basic
    @Column(name = "link_target")
    public String getLinkTarget() {
        return linkTarget;
    }

    public void setLinkTarget(String linkTarget) {
        this.linkTarget = linkTarget;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        MsgRecord msgRecord = (MsgRecord) o;
        return messageRecordId == msgRecord.messageRecordId &&
                status == msgRecord.status &&
                Objects.equals(uid, msgRecord.uid) &&
                Objects.equals(msgTitle, msgRecord.msgTitle) &&
                Objects.equals(msgType, msgRecord.msgType) &&
                Objects.equals(content, msgRecord.content) &&
                Objects.equals(createDate, msgRecord.createDate) &&
                Objects.equals(eventDate, msgRecord.eventDate) &&
                Objects.equals(event, msgRecord.event) &&
                Objects.equals(complete, msgRecord.complete) &&
                Objects.equals(eventStep, msgRecord.eventStep) &&
                Objects.equals(dicCode, msgRecord.dicCode) &&
                Objects.equals(eventId, msgRecord.eventId) &&
                Objects.equals(hospitalCode, msgRecord.hospitalCode) &&
                Objects.equals(msgId, msgRecord.msgId) &&
                Objects.equals(businessType, msgRecord.businessType) &&
                Objects.equals(parameters, msgRecord.parameters) &&
                Objects.equals(linkType, msgRecord.linkType) &&
                Objects.equals(linkTarget, msgRecord.linkTarget);
    }

    @Override
    public int hashCode() {
        return Objects.hash(messageRecordId, uid, msgTitle, msgType, content, status, createDate, eventDate, event, complete, eventStep, dicCode, eventId, hospitalCode, msgId, businessType, parameters, linkType, linkTarget);
    }
}
